package com.ruslan.magaz.repository;

import java.util.List;

import com.ruslan.magaz.domain.Address;
import com.ruslan.magaz.domain.Customer;
import com.ruslan.magaz.domain.Role;
import com.ruslan.magaz.domain.User;

public interface UserDao {
	public User login(String login, String password); 
	void addUser(User user);
	void removeUser(User user);
	User getUserById(Integer id);
	List<User> getUserByName(String name);
	List<User> getUserByEmail(String email);
//	int getUserIdByAddressId(String addressId);
	List<User> getAllUsers();
	Integer getFirstUserId();
	List<User> getAllUsersNotAdmin();
	void editUser(User user);
	void addCustomer(int userId, Customer customer);
	void removeCustomer(Customer customer);
	Customer getCustomerById(Integer id);
	List<Customer> getAllCustomers();
	void editCustomer(Customer customer);
	void addRole(Role role);
	void removeRole(Role role);
	Role getRoleById(Integer id);
	List<Role> getAllRoles();
	void editRole(Role role);
	void addAddress(int userId, Address address);
	void removeAddress(Address address);
	Address getAddressById(Integer id);
	List<Address> getAllAddresses();
	List<Address> getAllAddressesForUser(int userId);
	void editAddress(Address address);
	void favAddress(int customerId, Address address);
}
